package cn.edu.gcu.lost.dao;

import java.util.List;

import org.apache.ibatis.annotations.Param;

import cn.edu.gcu.lost.entity.Message;
import cn.edu.gcu.lost.entity.User;

public interface MessageMapper {
    int deleteByPrimaryKey(String id);

    int insert(Message record);

    int insertSelective(Message record);

    Message selectByPrimaryKey(String id);

    int updateByPrimaryKeySelective(Message record);

    int updateByPrimaryKeyWithBLOBs(Message record);

    int updateByPrimaryKey(Message record);

    int updateStatusByid(@Param(value = "id") String id);

    /* start: writed by rocky
     * date:2018-01-25 10:48:00
     */
    List<Message> findList(@Param(value = "type") String type, @Param(value = "thing") String thing, @Param(value =
            "self") String self, @Param(value = "selfId") String selfId, @Param(value = "status") String status,
                           @Param(value = "search") String search,
                           @Param(value = "start") int start, @Param(value = "size") int size);

    Integer countNum(@Param(value = "type") String type, @Param(value = "thing") String thing, @Param(value = "self")
            String self, @Param(value = "selfId") String selfId, @Param(value = "status") String status, @Param(value
            = "search") String search);

    List<Message> findListWithAllField(@Param(value = "type") String type, @Param(value = "thing") String thing,
                                       @Param(value = "status") String status, @Param(value = "search") String search,
                                       @Param(value = "start") int start, @Param(value = "size") int size);

    Message findDetailWithAllField(String id);

}